/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package milkyway.hightech.conditions;

import java.math.BigInteger;

/**
 *
 * @author michael
 */
public class GiroAccountConditions extends Conditions
{
    private ConditionTypes conditionType;
    
    private double debitInterest;
    
    public GiroAccountConditions(double creditInterest, double debitInterest, ConditionTypes conditionType)
    {
	super(creditInterest);
	this.debitInterest = debitInterest;
	this.conditionType = conditionType;
    }
    
    public double getDebitInterest()
    {
	return debitInterest;
    }
    
    @Override
    public double getCreditInterest()
    {
	return creditInterest;
    }

    public void setCreditInterest(double creditInterest)
    {
	this.creditInterest = creditInterest;
    }
    
    public void setDebitInterest(double debitInterest)
    {
	this.debitInterest = debitInterest;
    }
    
    public BigInteger getDispo()
    {
	switch(conditionType)
	{
	    case GROUP1:
		return new BigInteger("500000");
	    case GROUP2:
		return new BigInteger("250000");
	    case GROUP3:
		return new BigInteger("100000");
	}
	
	return null;
    }
    
    @Override
    public String toString()
    {
	String data = "";
	
	data += "Rating Group " + conditionType + " - Dispo: " + getDispo().toString() + " EUR"
		+ "\nCredit interest: " + creditInterest + " % p.A."
		+ "\nDebit interest: " + debitInterest + " % p.A.\n";
	
	return data;
    }
}
